<script setup lang="ts">
import router from "@/Router";
import {findUserById} from "@/Network/userApi";
import {ref} from "vue";

let currentUserId = localStorage.getItem("userId")
let userImg = ref()

findUserById(currentUserId).then(res=>{
  userImg.value = res.data.userImg
})

const sendUserTab = () => {
  router.push("/user")
}
</script>

<template>
  <div class="user-photo w-14 h-14 border-pink-3 border-2 rounded-full mt-1 mr-1.5 flex justify-center items-center"
    @click="sendUserTab"
  >
    <img :src="userImg" alt="用户图片" class="w-12  rounded-full">
  </div>

</template>

<style scoped>

</style>